#include"stack.h"
#include<stdlib.h>
#include<string.h>

int stack_init(stack* the_stack,int the_init_size){
  the_stack->backing_store = (array_list*)malloc(sizeof(array_list));
  array_list_init(the_stack->backing_store, 1);
  return 0;
}

void* stack_pop(stack* the_stack){
  return array_list_remove(the_stack->backing_store, the_stack->backing_store->size - 1) ;
}

int stack_push(stack* the_stack, void* the_item){
  return array_list_add(the_stack->backing_store, the_item);
}
